<template>
  <div class="score">
    <div class="left">
      <img
        src="//s0.meituan.net/bs/myfe/canary/file/asgard/images/movie/star-not-graded.png"
        alt=""
        v-for="item in num"
        :key="item"
      />
    </div>
    <div class="right">
      <div class="yellow" :style="{ width: score + '%' }"></div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["num", "score"],
  data() {
    return {};
  },
};
</script>

<style lang="less" scoped>
.score {
  display: flex;
  width: 100px;
  height: 10px;

  .left {
    width: 30px;
    text-align: right;

    img {
      width: 10px;
      vertical-align: top;
    }
  }

  .right {
    flex: 1;
    background-color: #333;
    margin-left: 5px;

    .yellow {
      height: 100%;
      background-color: gold;
    }
  }
}
</style>
